﻿using System;
using System.Diagnostics;
using System.IO;
using SoftwareLocker;

namespace Project5188.Client
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App
    {
        public App()
        {
            var t = new TrialMaker(String.Empty, Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName) + "\\RegFile.reg",
                Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName) + "\\Project5188.dbf",
                " Email: huseyingurkan@yahoo.com",
                30, 90, "745");

            byte[] myOwnKey = { 97, 250, 1, 5, 84, 21, 7, 63,
            4, 54, 87, 56, 123, 10, 3, 62,
            7, 9, 20, 36, 37, 21, 101, 57};

            t.TripleDesKey = myOwnKey;

            var rt = t.ShowDialog();
            if (rt == TrialMaker.RunTypes.Expired) return;
            var isTrial = rt != TrialMaker.RunTypes.Full;

            var login = new LoginWindow(isTrial);
            login.Show();
        }
    }
}
